package global

import (
	"github.com/gin-gonic/gin"
	"strconv"
)

type BaseApi struct {
}

/*
*
string转uint类型
*/
func (api *BaseApi) StringToUnit(c *gin.Context, field string) uint {
	roleId := c.Query(field)
	parseUint, _ := strconv.ParseUint(roleId, 10, 64)
	return uint(parseUint)
}
